using System;
using System.Collections.Generic;
using System.Net;
using System.Text;

namespace C__HomeWork
{
    internal class Q2
    {
        static void Main()
        {
            Console.WriteLine("请输入一个整数：");
            int number = int.Parse(Console.ReadLine());
            Console.WriteLine($"{number}的素数因子有：");
            Find(number);
        }

        static void Find(int num)
        {
            for(int i = 2; i <= num; i++)
            {
                if (num % i == 0)
                {
                    Console.WriteLine(i);
                    while (num % i == 0)
                    {
                        num /= i;
                    }
                }
            }
        }
    }
}
